Type POINTAPI 'used to identify location of drop action
x As Integer
y As Integer
End Type
Type Msg 'used by peekmessage function
hwnd As Integer
message As Integer
wparam As Integer
lParam As Long
time As Long
pt As POINTAPI
End Type
'dragacceptfiles tells windows that hwnd can accept drag/drop messages
Declare Sub DragAcceptFiles Lib "Shell" (ByVal hwnd As Integer, ByVal Accept As Integer)
'Main() uses peekmessage to determine if hwnd has received a d/d message
Declare Function PeekMessage Lib "User" (lpMsg As Msg, ByVal hwnd As Integer, ByVal wMsgFilterMin As Integer, ByVal wMsgFilterMax As Integer, ByVal wRemoveMsg As Integer) As Integer
'dragqueryfile is used to get number of files dropped (when indexFilenum=-1) and then name of each file in succession (when indexFilenum > -1)
Declare Function DragQueryFile Lib "Shell" (ByVal hdrop As Integer, ByVal indexFilenum As Integer, ByVal lpFileName As String, ByVal buffsize As Integer) As Integer
'dragfinish must be called after all filenames have been retrieved to cancel memory buffer for d/d operation
Declare Sub DragFinish Lib "Shell" (ByVal hwnd As Integer)